package com.dongchen.designpatter.chapter04.simplefactory.sample02;

/**
 * @author dongchen
 * @time 2021/9/17
 */
public class UserFactory {
    public static User getUser(int permission) {
        if (0 == permission) {
            return new Employee();
        }
        if (1 == permission) {
            return new Manager();
        }
        return null;
    }
}
